package com.tcxhb.job.core.service.job;

import com.tcxhb.job.dao.dataobject.JobInstanceDO;
import com.tcxhb.job.dao.dataobject.query.JobInstanceQuery;
import com.tcxhb.job.common.model.PageResponse;

import java.util.List;
/**
* author:auto.generator
* time: 2023-11-05
*/
public interface JobInstanceService {
    /**
    * 创建
    * @param jobInstanceDO
    * @return
    */
    Long create(JobInstanceDO jobInstanceDO);

    /**
     *
     * @param jobId
     * @param traceId
     * @return
     */
    JobInstanceDO queryByTraceId(Long jobId, String traceId);
    /**
    * 根据ID删除
    * @param id
    * @return
    */
    boolean deleteById(Long id);
    /**
    * 更新
    * @param jobInstanceDO
    * @return
    */
    boolean updateById(JobInstanceDO jobInstanceDO);
    /**
    * 查询
    * @param id
    * @return
    */
    JobInstanceDO queryById(Long id);
    /**
    * 分页查询
    * @param query
    * @return
    */
    PageResponse<JobInstanceDO> page(JobInstanceQuery query);
        /**
        * 列表查询
        * @param query
        * @return
        */
    List<JobInstanceDO> list(JobInstanceQuery query);

    /**
     *
     * @param query
     * @return
     */
    List<JobInstanceDO> scan(JobInstanceQuery query);
}
